.search {
  width: 80%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
  transition: all 0.3s ease;
  margin-left: 18px;
  top: 140px;
  position: relative;
  z-index: 999;
  .camera:hover {
    background: #ccc;
  }
  // 吸顶状态
  &.fixed {
    position: fixed !important;
    top: 60px !important;
    left: 14% !important;
    z-index: 1000;
    width: calc(100% - 28%);
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;

    // 添加平滑过渡
    animation: slideDown 0.3s ease;
    transition: top 0.3s ease, left 0.3s ease;

    .fixed-ellipsis {
      font-size: 20px;
      color: rgba(0, 0, 0, 0.45);
      cursor: pointer;
      margin-left: 10px;
      position: relative; // 添加相对定位
      padding: 4px;
      border-radius: 10px;
      &:hover {
        background: #ccc6;
      }
      .ellipsis-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
        border-radius: 4px;
        padding: 8px 0;
        min-width: 120px;
        z-index: 9999;

        .menu-item {
          padding: 8px 16px;
          color: #333;
          font-size: 14px;
          cursor: pointer;

          &:hover {
            background: #f5f5f5;
          }
        }
      }
    }

    .search-wrapper {
      position: relative;
      display: inline-block !important;
    }
  }
  // 吸顶动画
  @keyframes slideDown {
    from {
      transform: translateY(-100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  // 聚焦状态下的输入框
  .input-focused {
    .ant-input {
      padding-left: 80px !important; // 增加左侧padding
      text-indent: 10px; // 添加文本缩进
      transition: all 0.3s ease;
    }

    // 调整前缀图标位置
    .ant-input-prefix {
      transform: translateX(90px) !important;
      transition: all 0.3s ease;
    }

    // 调整placeholder位置
    .ant-input::placeholder {
      padding-left: 8px;
    }
  }

  //搜索框的下拉框
  .dropdown-panel {
    position: absolute;
    left: 2%;
    top: 28%;
    margin-top: 8px;
    z-index: 9999; // 高于内容盒子
    .ant-dropdown-menu {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
  }
  // 聚焦时内容
  .content-box {
    position: absolute;

    top: calc(100% + 10px);
    left: 30px;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    margin-top: 8px;
    padding: 16px;

    &.bottom {
      top: 76%;

      left: 41%;
      transform: translateX(-50%);
      width: 650px;
      z-index: 999 !important; // 低于下拉菜单
    }
    .content-list {
      display: flex;
      justify-content: space-around;
      flex-wrap: wrap;
      .content-item {
        width: 300px;

        margin: 10px 0px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        .conent-img {
          width: 80px;
          background: #f7f7f7;
          text-align: center;
          border-radius: 10px;
          img {
            width: 50px;
            height: 80px;
            margin-top: 5px;
          }
        }
      }
      .content-item:hover {
        background: #f2f2f2;
      }
    }

    .suggestion-container {
      padding: 10px;

      .suggestion-section {
        margin-bottom: 20px;

        h4 {
          font-size: 16px;
          font-weight: bold;
          margin-bottom: 10px;
          color: #333;
        }

        .suggestion-items {
          .suggestion-item {
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 4px;

            transition: all 0.2s;

            &:hover {
              background-color: #f5f7fa;
            }

            .suggestion-text {
              font-size: 14px;
              color: #333;
            }
          }
        }
      }
    }
  }

  //搜索框
  .ant-input-affix-wrapper {
    width: 800px !important;
    max-width: 800px;
    margin: 0 auto;
  }

  @media (max-width: 768px) {
    padding: 10px;

    .ant-input-affix-wrapper {
      width: 0% !important;
    }
  }

  // 上传弹窗样式
  .upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999999 !important;
    display: flex;
    justify-content: center;
    align-items: center;

    .upload-content {
      background: white;
      padding: 30px;
      border-radius: 8px;
      width: 500px;
      position: relative;

      h3 {
        text-align: center;
        margin-bottom: 20px;
      }

      .upload-area {
        border: 2px dashed #ccc;
        padding: 40px;
        text-align: center;

        p {
          color: #666;
          margin-bottom: 20px;
        }
      }

      .upload-buttons {
        margin-top: 20px;
        display: flex;
        gap: 20px;
        justify-content: center;
      }

      .close-icon {
        position: absolute;
        top: 15px;
        right: 15px;
        cursor: pointer;
        font-size: 16px;
        color: #999;

        &:hover {
          color: #666;
        }
      }
    }
  }
}
